use "dataset_city_selection", clear

tab OntheBallot Fundingrel

tab Fundingrel Bundled if OntheBallot == "Yes"

tab Fundingrel Bundled if afterfloyd == 1 & OntheBallot == "Yes"

keep if Fundingrel == "Yes" & Bundled == "No" & afterfloyd == 1 & ///
	OntheBallot == "Yes"

sort Year monthnum

local myvars Title Pop2010 shareblack
keep `myvars'
order `myvars'

foreach x in Title Pop2010 shareblack {
	replace `x' = "\cellcolor{light-gray}\textbf{" + `x' + "}" if ///
		regex(Title, "Baton Rouge") | regex(Title, "Fort Worth")
	replace `x' = "\textbf{" + `x' + "}" if regex(Title, "Oak Park")
}

#delimit;

listtex 
	using "_output/table A1.tex"
	,
		replace 
		type 
		rstyle(tabular) 	
		head(
		\begin{tabular}{p{0.55\textwidth}p{0.2\textwidth}
			p{0.2\textwidth}}
			\toprule Proposition & Population & Share Black \\
			\midrule
		)
		foot("\bottomrule\end{tabular}")
		;
		
#delimit cr
